\section{Tools}

\frame{
  \frametitle{New GUI}
  \B
  \item Provides user designation and annotation support
  \item Highlights multiple source lines
  \item Use dragging to reorganize JTree
  \E
}

\frame
{
  \frametitle{Command line tools}
  \B
  \item We've got a lot of command line tools
    \B
    \item some ant tasks, need to add more
    \item but all the command lines tools can be
          invoked from within ant
    \E
  \item We need to build a bigger, better tool chain
    \B
    \item we're open source, we welcome contributions
      \B
      \item Maven (contributed), Cruise control (?), ...
      \E
    \E
  \E
}

\frame
{
  \frametitle{XML analysis results}
  \B
  \item We use XML as the standard output from our
        analysis engine
  \item XML analysis results can be filtered, processed,
        displayed in the GUI, annotated, converted to text
         or HTML
  \item XML can be plain, or with messages
    \B
    \item with text/messages provides all the text to
          allow you to convert the XML into meaningful
           HTML without further FindBugs involvement
    \E
  \E
}

\frame
{
  \frametitle{findbugs}
  \B
  \item findbugs -textui -xml rt.jar $>$rt.xml
  \item run findbugs
    \B
    \item using the test user interface, rather than the
          GUI
    \item generate XML output, rather than one bug/line
      \B
      \item also have emacs output mode
      \E
    \item analyze all the classes in rt.jar, write the output
          to rt.xml
    \E
  \E
}

\frame
{
  \frametitle{filterBugs}
  \B
  \item filterBugs -priority H -category C rt.xml hc.xml
    \B
  \item Read the bugs in rt.xml, filter out just the high
        priority correctness bugs, and write them to
        hc.xml
    \E
  \E
}

\frame
{
  \frametitle{convertXmlToText}
  \B
  \item convertXmlToText hc.xml
    \B
  \item convert to simple one bug/line format
    \E
  \item convertXmlToText -html:fancy.xsl
    \B
  \item convert to html using fancy.xsl style sheet
    \E
  \E
}

\frame
{
  \frametitle{listBugDatabaseInfo \& setBugDatabaseInfo}
  \B
  \item Set information about the analysis
    \B
    \item -name name this analysis/version
    \item -time Give the timestamp for this analysis
    \item -addSource add a source directory
    \item -findSource find and add all relevant source
    directories
    \E
  \E
}

\frame
{
  \frametitle{unionBugs}
  \B
  \item combine results from analyzing disjoint classes
        into a single analysis file
    \B
  \item don't use this if the analysis files contain
        overlapping results
    \E
  \E
}

\frame
{
  \frametitle{computeBugHistory}
  \B
  \item computeBugHistory -output db.xml old.xml new.xml
    \B
    \item combine the analysis results in old.xml and new.xml
    \item write a historical analysis to db.xml
    \item old.xml can be a historical analysis
    \E
  \E
}

\frame
{
  \frametitle{matching old bugs with new bugs}
  \B
  \item We do a number of clever things (or things we
        think are clever) to match warnings from an old
        analysis with warnings in a new analysis
  \item Line numbers don't matter
  \item We err on overmatching
    \B
  \item if you modify a method, fixing one null pointer
        bug, and introducing another in the same
        method, we may think the bug hasn't changed
    \E
  \E
}

\frame
{
  \frametitle{mineBugHistory}
  \B
  \item mineBugHistory -formatDates -noTabs db.xml
    \B
  \item produce a tabular listing of the number of bugs
  introduced and eliminated in each build/version
  in a historical analysis
    \E
  \E
}

\frame
{
  \frametitle{Historical bug databases}
  \B
  \item Each historical bug database records a sequence
  of versions/builds/analysis results
  \item Each analysis result has a name, a date and a
  sequence number (starting at 0)
  \E
}

\frame[containsverbatim]
{
  \frametitle{Combing back to filterBugs}
  \B
  \item filterBugs has lots of options\\
\verb+filterBugs -first 1 db.xml | convertXmlToText+
  \item filter out just the warnings that first appeared in
  sequence \# 1 (the second analysis results), and convert
  the results to text
  \E
}

\frame{
  \frametitle{Importing bugs into your own bug databases}
  \B
  \item if you want to bring our results into a database
    \B
    \item generate xml with messages
    \item use instance-hash
      \B
    \item designed to be unique per bug, and match
    bugs across versions
    \item Not as clever as the approach we use when
    matching XML, but still clever
      \E
    \E
  \E
}
